package cordoba.domain
{
	import spark.components.Image;
	
	[Bindable]
	public class Process
	{
		public static const STOPPED:Number = 1;
		public static const INPROGRESS:Number = 2;
		public static const PENDING:Number = 3;
		public static const GREEN:Number = 4;
		public static const RED:Number = 5;		
		
		private const stopped_button:String = "../../assets/images/stopped_button.png";
		private const red_button:String = "../../assets/images/red_button.png";
		private const green_button:String = "../../assets/images/green_button.png";
		private const inprogress_button:String = "../../assets/images/inprogress_button.png";
		private const pending_button:String = "../../assets/images/pending_button.png";
		
		private var _status:Number;
		public var icon:String;
		public var idProcess:String;
		public var name:String;
		public var command:String;
		public var arguments:String;
		
		public function get status():Number {
			return _status;
		}
		
		public function set status(status:Number):void
		{
			_status = status;
			switch(status){
				case STOPPED:
					icon= stopped_button;
					break;
				case INPROGRESS:
					icon = inprogress_button;
					break;
				case PENDING:
					icon = pending_button;
					break;
				case GREEN:
					icon = green_button;
					break;
				case RED:
					icon = red_button;
					break;
			}
		}
	}
}